# window里部署后端项目到Linux服务器
ssh xxl.blue
cd /home
rm -rf shop
git clone git@gitee.com:lisailiya/shop
cd shop/shop-api

mkdir -p output
export env="prod"
go mod tidy
go build -o output/shopApi
kill $(ps -ef|grep 'shopApi'|grep -v 'grep' | awk '{print $2}') # 关闭之前启动的
nohup ./output/shopApi & # 后台启动
echo -e "启动成功：https://xxl.blue/shop-api/ping"
exit


# lsof -i:8888 根据端口号查询pid
